Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make aria-label and labelledby non global #967

Closed
wants to merge 34 commits into from

Conversation

jnurthen
Copy link
Member

@jnurthen jnurthen commented Apr 29, 2019

Draft PR to make aria-label and labelledby non global

For #833


Preview | Diff

@carmacleod
Copy link
Contributor

carmacleod commented Apr 29, 2019

Wow. This PR removes aria-label and aria-labelledby from all of the following roles:

  • alert
  • blockquote
  • caption
  • cell
  • definition
  • deletion
  • heading
  • insertion
  • label
  • legend
  • listitem
  • log
  • marquee
  • math
  • note
  • paragraph
  • presentation
  • roletype
  • rowgroup
  • section
  • sectionhead
  • status
  • structure
  • subscript
  • superscript
  • term
  • time
  • timer
  • tooltip

That's a lot of roles. :)

At first glance, I'm wondering about heading, because @DavidMacDonald's testing of aria-label, etc on static elements says:

If its a heading role , aria-label or aria-labelledby overrides it on NVDA, VoiceOver and Talkback. JAWS ignores the aria-label or aria-labelledby.

So we would break some expectations. Not sure of actual use in the wild.
Would sure be nice to have that data.

@jnurthen
Copy link
Member Author

This is a Draft PR. Its purpose is to provoke discussion. It is not going to be merged as-is.

@carmacleod
Copy link
Contributor

No worries. My comment was supposed to be the beginning of the discussion. :)
Edited to remove "before we commit this PR", so the final sentence now reads "Would sure be nice to have that data.", because that's all I really meant.

@carmacleod
Copy link
Contributor

Not sure if we should remove aria-label/aria-labelledby from math role?
Here's some discussion on labelling math role from @AmeliaBR and @joanmarie

michael-n-cooper and others added 16 commits May 2, 2019 17:48
…81 (#972)

* aria-expanded: revise definition and change applicability

Resolves issue #681 by:
* Revising aria-expanded definition to state it aria-expanded belongs on interactive, focusable, controlling element.
* Rewording normative authors SHOULD to clarify when aria-controls should be used.
* Trimming unnecessary content from aria-expanded description related to grouping mechanisms and the benefits of collapsing content.
* Removing support from document, section, sectionhead, and window.
* Restoring support to following subclass roles that were effected by removals: gridcell, listbox (for issue #722), row, rowheader, tab, and treeitem.
* Adding support for checkbox.
* Adding aria-expanded as supported for role application

Thus, support is removed from the roles listed below that do not act as interactive, focusable, controlling mechanisms for expansion:

alert
alertdialog
article
banner
blockquote
caption
cell
complementary
contentinfo
definition
deletion
dialog
directory
feed
figure
form
grid
group
heading
img
insertion
label
landmark
legend
list
listitem
log
main
marquee
math
menu
menubar
navigation
note
paragraph
radiogroup
region
search
select
status
subscript
superscript
table
tabpanel
term
time
timer
toolbar
tooltip
tree
treegrid
* Remove implicit value from heading role
* Adjust heading role verbiage to reflect aria-level authoring expectations
* Remove default value for aria-expanded from combobox role
* Update combobox role prose to better reflect removal of default aria-expanded value
@jnurthen jnurthen closed this May 21, 2019
Melanie Richards and others added 5 commits June 4, 2019 14:05
)

Addresses #860
* Reword slider role prose to reflect that aria-valuemin, valuemax are now supported, not required
* Remove aria-valuenow repair techniques from inline in the slider role
* Make fallback table more robust for aria-valuenow on slider role
* Add pointer to the fallback table from slider role
* Remove supported but not required attrs on slider from the author error handling table
…#944)

Addresses #858

* Update scrollbar role prose to better reflect properties moving from 'required' to 'supported'
* Scrollbar role: remove aria-valuenow repair techniques to the fallback table and point to said table
* Remove supported but not required attrs on scrollbar from the author error handling table
@jnurthen jnurthen reopened this Jun 13, 2019
@accdc
Copy link
Contributor

accdc commented Jun 13, 2019

Hi,
Just for the record, I wanted to document my concerns that I brought up during the meeting, and to expound on some primary concerns about the proposal here.

First, here is a basic example of a standard visual technique that is used all across the web to represent pagination buttons, itemized shopping cart buttons, new message buttons, date picker next and previous month and year buttons, and many other types.

<button><span aria-label="Next " class="nextArrowIcon"></span>Email</button>

This, plus the prevention of labeling on generic roles, will break all such implementations everywhere.

Regarding the points I made about the AccName and ARIA specs, it will be a very bad idea to say that these attributes will remain valid regardless of role within the AccName spec, but that the same attributes are prohibited in the ARIA spec on specific roles.

As was mentioned, I could indeed say that certain uses are valid when traversing child nodes within the AccName spec, however these will still be documented as prohibited in the ARIA spec with no such exceptions, thus leading to the same contradictions between the two normative specs.

If the purpose that we are trying to solve here is to prevent authors from being stupid, there is nothing that will ever prevent people from doing stupid things. As John Cleese said once: "You can't fix stupid."

However, if the intent is to get validators to flag improper uses of ARIA, this is best solved by adding these combinations to the HTML-ARIA spec because this is what the HTML validator actually maps to directly, and not the ARIA spec where such implementations might be the only way to fix specific accessibility issues when encountered. This is very important when remediating enterprise CMS platforms with legacy code bases.

There is another ramification when separating out a bunch of valid versus invalid roles when computing the accessible name, which will likely have an impact on the process speed and efficiency of the naming computation itself within browsers. If every iteration of the algorithm has to check every node against a comprehensive list of valid versus invalid role and element combinations, and this must be done on everything on the page to compute accessible names for everything, it will likely cause some pretty significant process lags and performance hits. This will already need to be done to a minor extent for roles that support name from content as opposed to those that don't when processing child nodes as we've previously discussed, but checking against a total index of all possible roles and implicit element types on every node during this traversal process will be expensive.

With all of these considerations in mind, I recommend leaving these attributes as global, and simply add recommended usage patterns to the HTML-ARIA spec instead to guide user authoring practices that way, rather than by messing with the actual accessibility of elements at their fundamental levels by breaking present day solutions that are already accessible.

All the best,
Bryan

@OwenEdwards
Copy link

I'd like to echo @accdc's concern about any change to ARIA that would be a breaking change in the wild. I hope the ARIA Working Group will carefully consider the impact of any potential breaking changes to the ARIA spec; there seems to be considerable danger that web developers who are not well versed in the intricacies of ARIA, and for whom it took considerable effort to persuade them to adopt the additional markup in their pages, will throw their hands up and abandon ARIA if non-backward compatible changes are introduced into the markup specification.

In particular, developers often use frameworks such as Modernizr to allow them to support a wide range of browsers, versions, and platforms that are part of the business requirements; however, it is impossible for these frameworks to detect which version of assistive technology (especially screen reader) is being used, so it is not possible for web pages to modify their behavior to adapt to older and newer versions of AT. This would make any breaking changes in ARIA especially impactful.

@jeffsmith
Copy link

Also echoing @accdc's concerns and wanted to highlight that I also agree that the following is the best way to begin steering devs and authors away from unintended usage:

"...this is best solved by adding these combinations to the HTML-ARIA spec because this is what the HTML validator actually maps to directly, and not the ARIA spec where such implementations might be the only way to fix specific accessibility issues when encountered."

Validation should be the carrot that leads folks away from improper usage, rather than breaking changes being introduced to the spec.

@jnurthen
Copy link
Member Author

Decided yet again not to go this way. closing

@jnurthen jnurthen closed this Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.